<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>CruiseControl.NET : Assembly Version Labeller</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            CruiseControl.NET : Assembly Version Labeller
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Jul 01, 2009 by <font color="#0050B2">csut017</font>.
				    </div>

				    <h3><a name="AssemblyVersionLabeller-AssemblyVersionLabeller"></a>Assembly Version Labeller</h3>

<p>Provides a valid System.Version label for your .NET assemblies that could be used to set the AssemblyVersionAttribute(). It increments the build number on every successful integration and uses the CruiseControl.NET change number, provided by source control systems like Subversion, for the revision number component.</p>

<h4><a name="AssemblyVersionLabeller-Version"></a>Version</h4>

<p>This labeller is available from release 1.4.4 onwards.</p>

<h3><a name="AssemblyVersionLabeller-Examples%3A"></a>Examples:</h3>

<p>Minimalist Example:</p>

<p><div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;project&gt;</span>
   <span class="code-tag">&lt;labeller type=<span class="code-quote">"assemblyVersionLabeller"</span> /&gt;</span>
   <span class="code-tag"><span class="code-comment">&lt;!-- Other project configuration to go here --&gt;</span></span>
<span class="code-tag">&lt;/project&gt;</span></pre>
</div></div><br clear="all" />
Full Example (build number and revision number component are incremented automatically):<br/>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;project&gt;</span>
   <span class="code-tag">&lt;labeller type=<span class="code-quote">"assemblyVersionLabeller"</span>&gt;</span>
      <span class="code-tag">&lt;major&gt;</span>1<span class="code-tag">&lt;/major&gt;</span>
      <span class="code-tag">&lt;minor&gt;</span>2<span class="code-tag">&lt;/minor&gt;</span>
      <span class="code-tag">&lt;incrementOnFailure&gt;</span>false<span class="code-tag">&lt;/incrementOnFailure&gt;</span>
   <span class="code-tag">&lt;/labeller&gt;</span>
   <span class="code-tag"><span class="code-comment">&lt;!-- Other project configuration to go here --&gt;</span></span>
<span class="code-tag">&lt;/project&gt;</span></pre>
</div></div><br clear="all" />
Specify all properties Example:<br/>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;project&gt;</span>
   <span class="code-tag">&lt;labeller type=<span class="code-quote">"assemblyVersionLabeller"</span>&gt;</span>
      <span class="code-tag">&lt;major&gt;</span>1<span class="code-tag">&lt;/major&gt;</span>
      <span class="code-tag">&lt;minor&gt;</span>2<span class="code-tag">&lt;/minor&gt;</span>
      <span class="code-tag">&lt;build&gt;</span>250<span class="code-tag">&lt;/build&gt;</span>
      <span class="code-tag">&lt;revision&gt;</span>1765<span class="code-tag">&lt;/revision&gt;</span>
      <span class="code-tag">&lt;incrementOnFailure&gt;</span>false<span class="code-tag">&lt;/incrementOnFailure&gt;</span>
   <span class="code-tag">&lt;/labeller&gt;</span>
   <span class="code-tag"><span class="code-comment">&lt;!-- Other project configuration to go here --&gt;</span></span>
<span class="code-tag">&lt;/project&gt;</span></pre>
</div></div><br clear="all" /></p>
<h3><a name="AssemblyVersionLabeller-ConfigurationElements%3A"></a>Configuration Elements:</h3>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Node </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Required </th>
<th class='confluenceTh'> Default </th>
<th class='confluenceTh'> Version </th>
</tr>
<tr>
<td class='confluenceTd'> major </td>
<td class='confluenceTd'> Major number component of the version. </td>
<td class='confluenceTd'> int </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> 0 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> minor </td>
<td class='confluenceTd'> Minor number component of the version. </td>
<td class='confluenceTd'> int </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> 0 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> build </td>
<td class='confluenceTd'> Build number component of the version. If not specified the build number is incremented on every successful integration. </td>
<td class='confluenceTd'> int </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> &#45;1 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> revision </td>
<td class='confluenceTd'> Revision number component of the version. If not specified the revision number is the LastChangeNumber, provided by some VCS (e.g. the svn revision with the Subversion task). </td>
<td class='confluenceTd'> int </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> &#45;1 </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> incrementOnFailure </td>
<td class='confluenceTd'> Whether to increase the build number component if the integration fails. By default the build number component will only increase if the integration was successful. </td>
<td class='confluenceTd'> boolean </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> false </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> dynamicValues </td>
<td class='confluenceTd'> Any dynamic parameters to be used. See <a href="Dynamic Parameters.html" title="Dynamic Parameters">Dynamic Parameters</a> </td>
<td class='confluenceTd'> Dynamic values array - see <a href="Dynamic Parameters.html" title="Dynamic Parameters">Dynamic Parameters</a> </td>
<td class='confluenceTd'> No </td>
<td class='confluenceTd'> <em>None</em> </td>
<td class='confluenceTd'> 1.5.0 </td>
</tr>
</tbody></table>
<p>Labeller provided by Daniel Nauck.</p>

				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Sep 29, 2009 20:59</font></td>
		    </tr>
	    </table>
    </body>
</html>